var e = require;
var t = module;
var n = exports;
"use strict";
var o,
    i = this && this.__extends ||
        (o = function (e, t) {
            return (o = Object.setPrototypeOf ||
                { __proto__: [] } instanceof Array && function (e, t) { e.__proto__ = t } ||
                function (e, t) { for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]) })(e, t)
        },
            function (e, t) {
                function n() { this.constructor = e }
                o(e, t), e.prototype = null === t ? Object.create(t) : (n.prototype = t.prototype, new n)
            }
        );
var r = this && this.__decorate ||
    function (e, t, n, o) {
        var i, r = arguments.length, y = r < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, n) : o;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate)
            y = Reflect.decorate(e, t, n, o);
        else
            for (var a = e.length - 1; 0 <= a; a--)
                (i = e[a]) && (y = (r < 3 ? i(y) : 3 < r ? i(t, n, y) : i(t, n)) || y);
        return 3 < r && y && Object.defineProperty(t, n, y), y
    };
Object.defineProperty(n, "__esModule", { value: !0 });
var y,
    a = e("BaseUI"),
    s = e("PlatformConst"),
    c = e("SceneConst"),
    x = e("UserConst"),
    l = e("PlatformManager"),
    h = e("PopupManager"),
    d = e("SceneManager"),
    u = e("UserManager"),
    f = e("XMADUtils"),
    t = cc._decorator,
    e = t.ccclass,
    e = (t.property,
        y = a.default,
        i(p, y),
        p.prototype.onLoad = function () {
            y.prototype.onLoad.call(this),
                this.addBtnOn("giveUpBtn", this.clickGiveUp, this),
                this.addBtnOn("videoBtn", this.clickVideo, this),
                this.initView()
        },
        p.prototype.onEnable = function () {
            // l.Platform.is(s.EPlatform.XIAOMI_ANDROID) ? 
            //     f.XMAD.showBannerFeed() : 
            //     l.Platform.showBanner()
            // window.__prv.showInter();
            window.__prv.doAction(4, ['ks']);
            window.__prv.doAction(1, ['oppo']);
            window.__prv.doAction(1, ['vivo']);
            //@ts-ignore
            window.__prv.doAction(1, ['ks5']);
            window.__prv.doAction('二级界面弹出插屏', ['hw']);
        },
        p.prototype.onDisable = function () {
            l.Platform.hideBanner()
        },
        p.prototype.initView = function () {
            cc.game.emit("gamelog", "page014")
        },
        p.prototype.clickGiveUp = function () {
            h.Popup.hide()
        },
        p.prototype.clickVideo = function () {
            var t = this;
            cc.game.emit("gamelog", "btn030"),
                window.__prv.showVideo(function () {
                    0 == 0 &&
                        (t.isEnterUgc ||
                            (cc.game.emit("gamelog", "rewarde_btn008"),
                                t.isEnterUgc = !0,
                                u.User.set(x.UserData.isUnlockUgc, 1),
                                d.Scene.loadScene(c.SceneConst.UGC)))
                })
        },
        r([e], p));
function p() {
    var e = null !== y && y.apply(this, arguments) || this;
    return e.isEnterUgc = !1, e
}
n.default = e;
